//
//  MasterData.m
//  TextApplication
//
//  Created by Apple on 16/9/19.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "MasterData.h"
#import "MasterItems.h"

@implementation MasterData

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"items"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            MasterItems *item = [MasterItems modelWithDic:dic];
            [array addObject:item];
        }
        _items = array;
    }
}

@end
